A Comparison of Designs for Extensible and Extension-Oriented Compilers

نویسندگان

  • Austin T. Clements
  • Frans Kaashoek
  • Arthur C. Smith
چکیده

Today’s system programmers go to great lengths to extend the languages in which they program. For instance, system-specific compilers find errors in Linux and other systems, and add support for specialized control flow to Qt and event-based programs. These compilers are difficult to build and cannot always understand each other’s language changes. However, they can greatly improve code understandability and correctness, advantages that should be accessible to all programmers. This thesis considers four extensible and extension-oriented compilers: CIL, Polyglot, xtc, and Xoc. These four compilers represent four distinctly different approaches to the problem of bridging the gap between language design and system implementation. Taking an extension author’s point of view, this thesis compares the design of each compiler’s extension interface in terms of extension structure, syntactic analysis, semantic analysis, and rewriting. To perform the comparison, this thesis uses three extensions implemented variously in the four compilers: a bitwise rotation operator, function expressions, and lock checking. These extensions are designed to span a representative space of analysis and rewriting needs. Based on this comparison, this thesis identifies the following implications of the design decisions of each extension interface: the expressiveness, understandability, and correctness of extension implementations can benefit from domain specific languages and language features tailored to the extension interface; compiler-managed scheduling trades loss of control for automatic extension composability; unifying internal and external program representation improves ease of use and extension composability, but gives up potentially useful control over the internal representation; concrete syntax patterns provide a natural interface to internal program representation, but must be more powerful than simple tree matching to be practical; grammars, types, and syntax interfaces have a natural correspondence; and accounting for semantic information in the final output enables hygienic rewriting, which can simplify extensions. Thesis Supervisor: M. Frans Kaashoek Title: Professor

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Implementing Extensible Compilers

New extensions to programming languages are constantly being proposed. But implementing these extensions usually turns out to be a very difficult and expensive task, since conventional compilers often lack extensibility and reusability. In this paper we present some fundamental techniques to implement extensible compilers in an object-oriented language. For being able to implement extensible co...

متن کامل

Implementing aspect-oriented programming constructs as modular language extensions

Extensible programming languages and their compilers are experimental systems that use highly modular specifications of languages and language extensions in order to allow a variety of language features to be easily imported, by the programmer, into his or her programming environment. Our framework for extensible languages is based on higher-order attribute grammars extended with a mechanism ca...

متن کامل

Aspects as Modular Language Extensions

Extensible programming languages and their compilers use highly modular specifications of languages and language extensions that allow a variety of different language feature sets to be easily imported into the programming environment by the programmer. Our model of extensible languages is based on higher-order attribute grammars and an extension called “forwarding” that mimics a simple rewriti...

متن کامل

Sergiy Kolesnikov. An Extensible Compiler for Feature-Oriented Programming in Java

Feature-oriented software development (FOSD) is a paradigm for developing large software systems. Fuji, an extensible compiler, supports featureoriented programming in Java. It does not rely on source-to-source translation but generates standard bytecode, which can be executed on any specifications-compliant Java virtual machine. This allows feature-oriented software developers to benefit from ...

متن کامل

Object Oriented Compiler Technology

This article describes a new approach to compiler technology. The project in which this approach evolved demands some special properties of compilers, such as language independence and dynamically extensible and orthogonal attributes. These properties cannot be modelled in conventional compiler technology. Therefore, existing technology is tted in an object oriented framework, which is a soluti...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008